package com.kimwu.design.prototype;

/**
 * 发送类
 */
public class Message implements Cloneable{
    //收信人名字
    private String receiver;
    //短信内容
    private String context;
    //构造函数
    public Message (Template template)
    {
        this.context = template.getContext();
    }

    @Override
    public Message clone(){
        Message message = null;
        try{
            message = (Message)super.clone();
        }
        catch(CloneNotSupportedException e){
            e.printStackTrace();
        }
        return message;
    }

    //setter/getter方法
    public String getContext(){
        return context;
    }

    public void setContext(String context){
        this.context = context;
    }

    public String getReceiver(){
        return receiver;
    }

    public void setReceiver(String receiver){
        this.receiver = receiver;
    }


}